﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;

namespace TV_Organizer.Preferences
{
    public class TVShowFolderPathPreviewConverter : IValueConverter
    {
        private TVShowFolderPathPreviewConverter()
        { }

        private static TVShowFolderPathPreviewConverter _instance = new TVShowFolderPathPreviewConverter();
        public static TVShowFolderPathPreviewConverter Instance { get { return _instance; } }

        private File exampleFile = new File("Supernatural.HDTV.720p.LOL.S05E03.avi")
        {
            SelectedShow = new TV_Organizer.FileScanner.UserTVShow("Supernatural"),
            Season = 5,
            Episode = 3,
        };

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return System.IO.Path.Combine(
                FileScanner.FolderNameParser.GetFolderName(exampleFile),
                exampleFile.TargetFilename);
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
